Package eu.europa.ec.taxud.cesop.writers
Class CesopXmlWriter<T extends OutputStream>
java.lang.Object
eu.europa.ec.taxud.cesop.writers.CesopXmlWriter<T>
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
ValidationMessageXmlWriter
Utils class to write XML files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidflush()Returns the output stream.protected voidwriteAttribute(String name, String value) protected voidwriteBoolean(boolean value) protected voidprotected voidwriteEOL()protected voidprotected voidwriteInteger(Integer value) protected voidprotected voidprotected voidprotected voidwriteStartElement(String localName) protected voidwriteStartElement(QName qName) protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidwriteTagIfNotEmpty(String localName, Integer value) protected voidwriteTagIfNotEmpty(String localName, String value) protected voidprotected void
-
Constructor Details
-
CesopXmlWriter
Constructor.- Parameters:
outputStream- the output stream- Throws:
XMLStreamException- in case of exception
-
-
Method Details
-
writeNamespace
- Throws:
XMLStreamException
-
writeStartDocument
- Throws:
XMLStreamException
-
writeTag
- Throws:
XMLStreamException
-
writeAttribute
- Throws:
XMLStreamException
-
writeTagWithAttributes
protected void writeTagWithAttributes(QName qName, String value, Map<String, String> attributes) throws XMLStreamException- Throws:
XMLStreamException
-
writeTag
- Throws:
XMLStreamException
-
writeTag
- Throws:
XMLStreamException
-
writeTagIfNotEmpty
- Throws:
XMLStreamException
-
writeTagIfNotEmpty
- Throws:
XMLStreamException
-
writeTag
- Throws:
XMLStreamException
-
writeTag
- Throws:
XMLStreamException
-
writeTag
- Throws:
XMLStreamException
-
writeStartElement
- Throws:
XMLStreamException
-
writeStartElement
- Throws:
XMLStreamException
-
writeEndElement
- Throws:
XMLStreamException
-
writeText
- Throws:
XMLStreamException
-
writeBoolean
- Throws:
XMLStreamException
-
writeInteger
- Throws:
XMLStreamException
-
writeLong
- Throws:
XMLStreamException
-
writeEOL
- Throws:
XMLStreamException
-
writeIndentIfNeeded
- Throws:
XMLStreamException
-
flush
- Throws:
XMLStreamException
-
getOutputStream
Returns the output stream.- Returns:
- the output stream.
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
XMLStreamExceptionIOException
-